package br.com.mtg.movethegarbage.framework;

import android.view.KeyEvent;

public class GameKeyEvent
{
	public static int KEY_DOWN = 0;
	public static int KEY_UP = 1;

	public int type;
	public int keyCode;
	public char keyChar;

	public GameKeyEvent(KeyEvent e)
	{
		if (e.getAction() == KeyEvent.ACTION_DOWN)
			this.type = KEY_DOWN;
		else if (e.getAction() == KeyEvent.ACTION_UP)
			this.type = KEY_UP;

		this.keyCode = e.getKeyCode();
		this.keyChar = (e.getUnicodeChar() == 0 ? '\0' : (char) e.getUnicodeChar());
	}
}
